/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cor;

import general.MessageHandler;
import general.UDPMessage;

/**
 *
 * @author foliveira
 */
public class SynchronizeHandler extends MessageHandler {

  @Override
  public boolean accept(UDPMessage message) {
    this.setRequest(message.getText());

    //
    if ( (getRequest().getAgent().contains("1")) && 
            (getRequest().getCommand().contains("SYNCHRONIZE")) )
      return true;
    else
      return false;
    
    
  }

   
  @Override
  public void doHandle(UDPMessage message) {
    try {
      message.reply("HandlerServers respondeu adequadamente...");
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
}
